package com.example.distinguishcolors.domain;

import com.litesuits.orm.db.annotation.NotNull;
import com.litesuits.orm.db.annotation.PrimaryKey;
import com.litesuits.orm.db.annotation.Table;
import com.litesuits.orm.db.enums.AssignType;

/**
 * @author Yingyong Lao
 * 创建时间 2021/10/3 21:44
 * @version 1.0
 */
@Table("game_record")
public class GameRecord {
    @PrimaryKey(AssignType.AUTO_INCREMENT)
    private int id;

    @NotNull
    private String playerName;//玩家姓名

    private int level;//玩到第几关

    private int spendTime;//整局游戏所花费的时间,单位：毫秒

    private long timeMillis;//游戏结束时的时间戳

    public GameRecord() {
    }

    public GameRecord(String playerName, int level, int spendTime, long timeMillis) {
        this.playerName = playerName;
        this.level = level;
        this.spendTime = spendTime;
        this.timeMillis = timeMillis;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPlayerName() {
        return playerName;
    }

    public void setPlayerName(String playerName) {
        this.playerName = playerName;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getSpendTime() {
        return spendTime;
    }

    public void setSpendTime(int spendTime) {
        this.spendTime = spendTime;
    }

    public long getTimeMillis() {
        return timeMillis;
    }

    public void setTimeMillis(long timeMillis) {
        this.timeMillis = timeMillis;
    }

    @Override
    public String toString() {
        return "GameRecord{" +
                "id=" + id +
                ", playerName='" + playerName + '\'' +
                ", level=" + level +
                ", spendTime=" + spendTime +
                ", timeMillis=" + timeMillis +
                '}';
    }
}
